<template>
    <el-button
            type="primary"
            :style="buttonStyle"
            :icon="icon"
            :size="size"
            :loading="loading"
            :native-type="nativeType"
    >
        <slot></slot>
    </el-button>
</template>

<script lang="ts">
import { Component, Prop, Watch, Vue } from 'vue-property-decorator'

@Component({
  components: {}
})
export default class ElButtonSubmit extends Vue {
  @Prop({
    default: true
  })
  readonly isBlock!: any
  @Prop({
    default: 'iconfont icon-save'
  })
  readonly icon!: any
  @Prop({
    default: 'mini'
  })
  readonly size!: any
  @Prop({
    default: false
  })
  readonly loading!: any
  @Prop({
    default: 'submit'
  })
  readonly nativeType!: any

  mounted() {
    this.reload()
  }

  activated() {}

  reload() {}

  get buttonStyle() {
    return {
      'width': this.isBlock ? '100%' : 'auto'
    }
  }

}
</script>

<style lang="less" scoped>
    @import (reference) "~@/style/all.less";

    .ElButtonSubmit {
    }
</style>